CV之NS之VGG16:基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用

244 篇文章 234 订阅

CV之NS之VGG16:基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用

导读
通过代码设计,基于Keras的VGG16实现A Neural Algorithm of Artistic Style之灭霸风格迁移设计

目录

基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用

输出结果实现

灭霸风格素材

1、对我的偶像,下手……

2、其他风格迁移设计

核心代码


基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用

输出结果实现

灭霸风格素材


 

1、对我的偶像,下手……

22044672/58889256 [==========>...................] - ETA: 1:53
22077440/58889256 [==========>...................] - ETA: 1:53
22093824/58889256 [==========>...................] - ETA: 1:53
22126592/58889256 [==========>...................] - ETA: 1:52
22142976/58889256 [==========>...................] - ETA: 1:52
22183936/58889256 [==========>...................] - ETA: 1:52
……
58826752/58889256 [============================>.] - ETA: 0s
58859520/58889256 [============================>.] - ETA: 0s
58875904/58889256 [============================>.] - ETA: 0s
58892288/58889256 [==============================] - 250s 4us/step
Model loaded.

Start of iteration 0
Current loss value: 2254528800.0
Image saved as F:\File_Python\Python_example\fast_style_transfer_master\examples\results_at_iteration_0.png
Iteration 0 completed in 252s
Start of iteration 1
Current loss value: 1771042400.0
Image saved as F:\File_Python\Python_example\fast_style_transfer_master\examples\results_at_iteration_1.png
Iteration 1 completed in 238s
Start of iteration 2



2、其他风格迁移设计



核心代码

#Keras:基于Keras的VGG16实现A Neural Algorithm of Artistic Style
from keras.preprocessing.image import load_img, img_to_array
import numpy as np
from scipy.misc import imsave
from scipy.optimize import fmin_l_bfgs_b
import time
from keras.applications.vgg16 import VGG16
from keras.applications.vgg16 import preprocess_input
from keras import backend as K
import os

# References
    - [A Neural Algorithm of Artistic Style](http://arxiv.org/abs/1508.06576)
'''

base_image_path=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\content\20180214(21).jpg'
style_reference_image_path=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\style\mieba02.jpg'
result_prefix=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\results'

iterations=10
content_weight=0.025
style_weight=1.0
total_variation_weight=1.0
  • 13
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一个处女座的程序猿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值